package com.dm.test;

import java.util.*;

public class Collections {
    public static void main(String[] args) {
        Collection<String> collection = new ArrayList<String>();

        collection.add("hello");
        collection.add("world");
        collection.add("ping");

        System.out.println(collection);

//        迭代器
        Iterator<String> iterator = collection.iterator();

        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }

        List<String> l = new ArrayList<String>();

        ListIterator<String> stringListIterator = l.listIterator();

    }
}
